import React from 'react'
import ReactDOM from 'react-dom'
import {HashRouter,BrowserRouter} from 'react-router-dom'
import {Provider} from 'react-redux'
import store from './store'
import App from './App'

// const context = React.createContext()
// <context.Provider value="ssss"></context.Provider>
// import MyProvider from "./Hook/myredux"
// 根据环境变量自动切换路由模式
const Router = process.env.NODE_ENV === 'production' ? BrowserRouter : HashRouter

ReactDOM.render(
    <Provider store={store}>
        <Router>
            {/* <MyProvider> */}
                <App/>
            {/* </MyProvider> */}
        </Router>
     </Provider>
    ,
    document.querySelector('#app')
)